Linear graph grammar